package com.xafc.demo;

import com.xafc.demo.framework.config.ApplicationProperties;
import com.xafc.demo.security.config.JwtSecurityProperties;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Import;

@MapperScan("com.xafc.demo.*.dao")
@Import(cn.hutool.extra.spring.SpringUtil.class)
@EnableConfigurationProperties({ApplicationProperties.class, JwtSecurityProperties.class})
@SpringBootApplication
public class DemoSecurityApplication  extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(DemoSecurityApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(
            SpringApplicationBuilder builder) {
        return builder.sources(this.getClass());
    }
}
